<style>
  .bazel-button-bar {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
  }
</style>

<div class="bazel-button-bar">
  <div>
    <a class="button button-with-icon" href="https://github.com/bazelbuild/bazel/issues/new?title=%5Bbazel.build%5D+Problem+with+{% dynamic print request.path %}&template=doc_issue.yml&link=https%3A%2F%2Fbazel.build{% dynamic print request.path %}" target="_blank">
      Report an issue<span class="material-icons icon-after" aria-hidden="true">open_in_new</span>
    </a>
    {% dynamic if not setvar.source_file %}
      {% dynamic if "version" in request.path %}
        {% dynamic setvar branchpath "/release-"+request.path.split("/")[2]+"/site/en/"+"/".join(request.path.split("/")[3:]) %}
        <a class="button button-with-icon" href="https://github.com/bazelbuild/bazel/tree{% dynamic print setvar.branchpath %}.md" target="_blank">
      {% dynamic else %}
        <a class="button button-with-icon" href="https://github.com/bazelbuild/bazel/tree/master/site/en{% dynamic print request.path %}.md" target="_blank">
      {% dynamic endif %}
        View source<span class="material-icons icon-after" aria-hidden="true">open_in_new</span>
      </a>
    {% dynamic elif setvar.source_file != "NONE" %}
      <a class="button button-with-icon" href="https://github.com/bazelbuild/bazel/tree/master/{% dynamic print setvar.source_file %}" target="_blank">
        View source<span class="material-icons icon-after" aria-hidden="true">open_in_new</span>
      </a>
    {% dynamic endif %}
    {% dynamic if not setvar.original_path %}
      {% dynamic setvar original_path %}{% dynamic print request.path %}{% dynamic endsetvar %}
    {% dynamic endif %}
  </div>

  <div>
    {% dynamic if not setvar.version %}
      <strong>Nightly</strong>
    {% dynamic else %}
      <a href="{% dynamic print setvar.original_path %}">Nightly</a>
    {% dynamic endif %}

<!-- The lines below are updated by //scripts/docs:gen_new_toc -->
<!-- BEGIN_VERSION_INDICATOR -->
·
{% dynamic if setvar.version == "8.4.0" %}
<strong>8.4</strong>
{% dynamic else %}
<a href="/versions/8.4.0{% dynamic print setvar.original_path %}">8.4</a>
{% dynamic endif %}
·
{% dynamic if setvar.version == "8.3.0" %}
<strong>8.3</strong>
{% dynamic else %}
<a href="/versions/8.3.0{% dynamic print setvar.original_path %}">8.3</a>
{% dynamic endif %}
·
{% dynamic if setvar.version == "8.2.0" %}
<strong>8.2</strong>
{% dynamic else %}
<a href="/versions/8.2.0{% dynamic print setvar.original_path %}">8.2</a>
{% dynamic endif %}
·
{% dynamic if setvar.version == "8.1.0" %}
<strong>8.1</strong>
{% dynamic else %}
<a href="/versions/8.1.0{% dynamic print setvar.original_path %}">8.1</a>
{% dynamic endif %}
·
{% dynamic if setvar.version == "8.0.0" %}
<strong>8.0</strong>
{% dynamic else %}
<a href="/versions/8.0.0{% dynamic print setvar.original_path %}">8.0</a>
{% dynamic endif %}
·
{% dynamic if setvar.version == "7.7.0" %}
<strong>7.7</strong>
{% dynamic else %}
<a href="/versions/7.7.0{% dynamic print setvar.original_path %}">7.7</a>
{% dynamic endif %}

<!-- END_VERSION_INDICATOR -->
  </div>
</div>
